package autokeyboard.data;

import java.util.StringTokenizer;

public class GetData
{
	private DataAccess data = new DataAccess();
	
	/**
	 * This method will return a list normal Icons that use in panelButton
	 * @return a list path of normal icons
	 */
	public String[] getListIconsNormal()
	{
		String fileData = data.readFile(getClass().getResourceAsStream("/Data/List_Icons_Normal.txt"));
		StringTokenizer token = new StringTokenizer(fileData);
		String[] listIcons = new String[token.countTokens()];
		
		for(int i = 0 ;i<listIcons.length; i++)
		{
			listIcons[i] = token.nextToken();
		}
		
		return listIcons;
	}
	
	/**
	 * This method will return a list over disabled icons that use in panelButton when mouse is over that button
	 * @return a list path of over icons
	 */
	public String[] getListIconsOver()
	{
		String fileData = data.readFile(getClass().getResourceAsStream("/Data/List_Icons_Over.txt"));
		StringTokenizer token = new StringTokenizer(fileData);
		String[] listIcons = new String[token.countTokens()];
		
		for(int i = 0 ;i<listIcons.length; i++)
		{
			listIcons[i] = token.nextToken();
		}
		return listIcons;
	}
	
	/**
	 * This method will return a list normal disabled Icons that use in panelButton
	 * @return a list path of normal icons
	 */
	public String[] getListIconsNormalDisabled()
	{
		String fileData = data.readFile(getClass().getResourceAsStream("/Data/List_Icons_Normal_Disabled.txt"));
		StringTokenizer token = new StringTokenizer(fileData);
		String[] listIcons = new String[token.countTokens()];
		
		for(int i = 0 ;i<listIcons.length; i++)
		{
			listIcons[i] = token.nextToken();
		}
		
		return listIcons;
	}
	
	/**
	 * This method will return a list over icons that use in panelButton when mouse is over that button
	 * @return a list path of over icons
	 */
	public String[] getListIconsOverDisabled()
	{
		String fileData = data.readFile(getClass().getResourceAsStream("/Data/List_Icons_Over_Disabled.txt"));
		StringTokenizer token = new StringTokenizer(fileData);
		String[] listIcons = new String[token.countTokens()];
		
		for(int i = 0 ;i<listIcons.length; i++)
		{
			listIcons[i] = token.nextToken();
		}
		return listIcons;
	}
}
